function [  ] = read( this, fileName, delimiter )
%READ Summary of this function goes here
%   Detailed explanation goes here
% DataMatrix::

%%%TODO
% fId = fopen(fileName, 'r');
% firstLine = fgetl(fId);
% delimterId = find(firstLine == delimiter);
% firstEntry = firstLine(1:(delimterId(1) - 1));
% if isnan(str2double(firstEntry))
%     %%%TODO
% end
% fclose(fId);

[filePathStr, fileTrunkName, fileExtensionName] = fileparts(fileName);

switch lower(fileExtensionName)
    case '.arff'
%         keyboard
        wekaObj = loadARFF(fileName);
        mat = zeros(wekaObj.numInstances, wekaObj.numAttributes);
        zColName = cell(1, wekaObj.numAttributes);
        for iCol = 1:wekaObj.numAttributes
            mat(:, iCol) = wekaObj.attributeToDoubleArray(iCol - 1);
            zColName{iCol} = char(wekaObj.attribute(iCol - 1));
        end
        this.setMat(mat, {''}, zColName);
    otherwise
        error('BatErr: Unsupported file type');
end

% mat = dlmread(fileName, delimiter, 1, 0);
% this.setMat(mat, {''}, {''});

end

